﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:MetroTipi.Common">



    <DataTemplate x:Key="Sites200x200ItemTemplate">
        <Grid HorizontalAlignment="Left" Width="312" Height="234">
            <Border Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}">
                <Image Source="{Binding image_medium}" Stretch="Uniform"/>
            </Border>
            <StackPanel VerticalAlignment="Bottom" Background="{StaticResource ListViewItemOverlayBackgroundThemeBrush}">
                <TextBlock Text="{Binding title}" Foreground="{StaticResource ListViewItemOverlayForegroundThemeBrush}" Style="{StaticResource TitleTextStyle}" Height="30" Margin="10,0,10,0"/>
                <StackPanel Orientation="Horizontal" Margin="10,0,10,10">
                    <TextBlock Text="{Binding name}" Foreground="{StaticResource ListViewItemOverlaySecondaryForegroundThemeBrush}" Style="{StaticResource CaptionTextStyle}" TextWrapping="NoWrap" Margin="0,0,10,0"/>
                    <TextBlock Text="{Binding nb_users}" Foreground="{StaticResource ListViewItemOverlaySecondaryForegroundThemeBrush}" Style="{StaticResource CaptionTextStyle}" TextWrapping="NoWrap" Margin="0,0,10,0"/>
                    <TextBlock Text="{Binding new_public_msg}" Foreground="{StaticResource ListViewItemOverlaySecondaryForegroundThemeBrush}" Style="{StaticResource CaptionTextStyle}" TextWrapping="NoWrap"/>
                </StackPanel>
            </StackPanel>
        </Grid>
    </DataTemplate>


    <DataTemplate x:Key="Sites80ItemTemplate">
        <Grid Margin="6">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Border Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}" Width="60" Height="60">
                <Image Source="{Binding image_small}" Stretch="UniformToFill"/>
            </Border>
            <StackPanel Grid.Column="1" Margin="10,0,0,0">
                <TextBlock Text="{Binding title}" Style="{StaticResource ItemTextStyle}" MaxHeight="40"/>
                <TextBlock Text="{Binding name}" Style="{StaticResource CaptionTextStyle}" TextWrapping="NoWrap"/>
            </StackPanel>
        </Grid>
    </DataTemplate>

    <DataTemplate x:Key="Albums100x100ItemTemplate">
        <Grid HorizontalAlignment="Left" Width="250" Height="100">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="100"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Border Grid.Column="0" Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}">
                <Image Source="{Binding image_small}" Stretch="UniformToFill"/>
            </Border>
            <TextBlock Grid.Column="1" VerticalAlignment="Top" Text="{Binding name}" Foreground="{StaticResource ListViewItemOverlayForegroundThemeBrush}" Style="{StaticResource TitleTextStyle}" Margin="10" TextWrapping="Wrap"/>
        </Grid>
    </DataTemplate>

    <DataTemplate x:Key="Photos100x100ItemTemplate">
        <Grid HorizontalAlignment="Left" Width="100" Height="100">
            <Border Grid.Column="0" Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}">
                <Image Source="{Binding url_small}" Stretch="UniformToFill"/>
            </Border>
        </Grid>
    </DataTemplate>
    
<DataTemplate x:Key="Photos312x234ItemTemplate">
        <Grid HorizontalAlignment="Left" Width="312" Height="234">
            <Border Grid.Column="0" Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}">
                <Image Source="{Binding url_medium}" Stretch="UniformToFill"/>
            </Border>
        </Grid>
    </DataTemplate>
</ResourceDictionary>
